package cn.etynit.feign;
import cn.etynit.domain.User;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class UserserviceGetByUserId implements FallbackFactory<Userservice> {
    @Override
    public Userservice create(Throwable throwable) {
        return new Userservice() {
            @Override
            public User getUserById(Long id) {
                return new User(-1L,"你说你就要远走","我喝下最后一口酒");
            }
        };
    }
}
